package com.btm.mcp.business.config;

import com.btm.mcp.business.mcp.BusinessTermMcpServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
public class BusinessTermsMcpConfig {

    /**
     * 注册MCP服务
     */
    @Bean
    ToolCallbackProvider toolCallbackProvider(BusinessTermMcpServer businessTermMcpServer) {
        log.info("BusinessTerms ToolCallbackProvider initialized");
        return MethodToolCallbackProvider
                .builder()
                .toolObjects(businessTermMcpServer)
                .build();
    }
}